Skip to content

perf: pass storage to tryFallbackAccounts to skip redundant disk read#22

Open
iceteaSA wants to merge 1 commit into
cortexkit:mainfrom
iceteaSA:perf/tryFallbackAccounts-storage
Open

perf: pass storage to tryFallbackAccounts to skip redundant disk read#22
iceteaSA wants to merge 1 commit into
cortexkit:mainfrom
iceteaSA:perf/tryFallbackAccounts-storage

Conversation

@iceteaSA
Copy link
Copy Markdown

Summary

Adds an optional existingStorage parameter to tryFallbackAccounts(). The fetch handler loads storage at the start of every request but tryFallbackAccounts was reloading it from disk unnecessarily.

Companion to #19 which does the same for getUsableFallbackAccounts.

Testing

All 214 tests pass. No behavior change — only avoids redundant disk I/O.

The fetch handler already loads storage at the start of every request.
tryFallbackAccounts was reloading it from disk unnecessarily. Now
accepts an optional existingStorage parameter to reuse the caller's
copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant